package com.controller.vo;

import org.springframework.beans.BeanUtils;

import com.controller.vo.base.BaseVo;
import com.utils.enums.ENUM_ROLES;

public class PersonVo extends BaseVo{
	
	private String account;
	
	private String userName;
	
	private String password;
	
	private Integer role;
	
	private String openId;
	
	private int sex;
	
	private String idCard;
    
	public PersonVo(Object c) {
		if(c != null) {
			BeanUtils.copyProperties(c, this);
		}
	}
	
	public PersonVo() {
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getAccount() {
		return account;
	}
	
	public String getPhone() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public Integer getType() {
		if(role == null) {
			return ENUM_ROLES.NORMAL.value;
		}
		return role;
	}

	public Integer getRole() {
		return role;
	}

	public void setRole(Integer role) {
		this.role = role;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}
	
}
